package com.zgjkhis.modules.system.service.impl;

import com.zgjkhis.common.service.impl.BaseServiceImpl;
import com.zgjkhis.modules.system.domain.CptStore;
import com.zgjkhis.modules.system.domain.vo.CptStoreVO;
import com.zgjkhis.modules.system.service.CptStoreService;
import com.zgjkhis.modules.system.service.mapper.CptStoreMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

// 默认不使用缓存
//import org.springframework.cache.annotation.CacheConfig;
//import org.springframework.cache.annotation.CacheEvict;
//import org.springframework.cache.annotation.Cacheable;

/**
 * @Author yzq
 * @Description 合作门店
 * @Date 2021/6/23 9:47
 * @Param
 * @return
 **/
@Service
//@CacheConfig(cacheNames = "user")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class CptStoreServiceImpl extends BaseServiceImpl<CptStoreMapper, CptStore> implements CptStoreService {

    /**
     * 根据id查询合作药房
     * @param cptStore
     * @return
     */
    @Override
    public CptStore getOneBystoreId(CptStore cptStore) {
        return baseMapper.getOneBystoreId(cptStore);
    }

    @Override
    public List<CptStoreVO> getCptStore(String storeId) {
        return baseMapper.getCptStore(storeId);
    }
}
